const express = require('express');

const app = express();

app.use((req,res,next)=>{
    const time = Date.now()
    // 给req挂载一个自定义属性，从而把时间暴露出去
    req.startTime = time;
    next()
})

app.get('/',(req,res)=>{
    console.log(req.startTime)
    res.send("Home Page")
})

app.listen(80,()=>{
    console.log("http://127.0.0.1");
})